<template>
  <section class="component apply-history-detail">
    <data-box :data="dataSet">
      <template slot="columns">
        <el-table-column
          :min-width="$helper.getColumnWidth(5)"
          label="审批人姓名"
          prop="approvalRealName"
        ></el-table-column>
        <el-table-column
          :min-width="$helper.getColumnWidth(5)"
          label="审批时间"
          :formatter="row => $filter.dateTimeFormat(row.approvalTime)"
          prop="approvalTime"
        ></el-table-column>
        <el-table-column
          :min-width="$helper.getColumnWidth(5)"
          label="审批结果"
          :formatter="
            row => $filter.dictConvert(row.applyStatus, 'ApplyStatus')
          "
          prop="applyStatus"
        ></el-table-column>
        <!-- <el-table-column
          :min-width="$helper.getColumnWidth(5)"
          label="审批结果"
          prop="approvalOpinion"
        ></el-table-column> -->
      </template>
    </data-box>

    <div class="confirm-button">
      <el-button @click="emitClose">关闭</el-button>
    </div>
  </section>
</template>
<script lang="ts">
import { Vue, Component, Emit, Prop } from "vue-property-decorator";
import { Dependencies } from "~/core/decorator";
import { CaseApplyRecordService } from "~/services/domain-service/case-apply-record.service.ts";
@Component({
  components: {}
})
export default class ApplyHistoryDetail extends Vue {
  @Dependencies(CaseApplyRecordService)
  private caseApplyRecordService: CaseApplyRecordService;
  @Prop() private row;
  private dataSet: any = [];
  @Emit("close") private emitClose() {}

  private getDataList() {
    this.caseApplyRecordService
      .recordHistory({ applyId: this.row.applyId, applyCategory: this.row.applyCategory })
      .subscribe(data => {
        this.dataSet = data;
      });
  }
}
</script>
